#pragma once


#include "AudioSource.h"
#include "../ResourceMap.h"

namespace fxcc
{
    struct AudioSourceResource :public fxcc::ResourceMap<AudioSource>
    {
        bool LoadPath(const std::string& path);

        bool LoadWav(const std::string& path)
        {
            AudioSource::Desc desc;
            desc.m_WavPath = path;
            desc.m_Type = AudioSource::Desc::Type::_Wav_;

            return Load(desc);
        }
        bool LoadOgg(const std::string& path)
        {
            AudioSource::Desc desc;
            desc.m_OggPath = path;
            desc.m_Type = AudioSource::Desc::Type::_Ogg_;
            return Load(desc);
        }
        static AudioSourceResource& Inst()
        {
            static AudioSourceResource res;
            return res;
        }
    };

};